home *** CD-ROM | disk | FTP | other *** search
- Path: yama.mcc.ac.uk!dmu!usenet
- From: Christopher Pilsworth <hcm94cp@dmu.ac.uk>
- Newsgroups: comp.lang.c++
- Subject: File Indexing
- Date: Mon, 01 Apr 1996 13:40:10 -0800
- Organization: DeMontfort University
- Message-ID: <31604D3A.16D6@dmu.ac.uk>
- NNTP-Posting-Host: mkcsug08.mk.dmu.ac.uk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
- CC: jsnook, gperkins
-
- Hi there,
-
- I am currently having a problem with how to implement a lightwieght
- database application. I have to write an application that handles
- bookings for a squash court. There are three main objects:
-
- Member
- Booking
- Court
-
- I have also designed a template class called "CFile" which handles all
- basic record I/O. This is fine for the member table as it does not need
- to be indexed ( I have a simple iterator/cursor for picking out
- particular records). The bookings file however needs to be indexed on:
-
- date + time + court number
-
- I would like a good way of checking that a court can not be double
- booked. A way around this I thought would be to keep the booking index
- in memory as a Set (Am I right in thinking you can prevent duplicates
- from being added?). I have looked at the STL implementation, but just
- looking at STL code generally gives me a headache. Is it possible
- though, to make this container's contents persistant?
-
- I do have database libraries but I have to code this one from the ground
- up.
-
- Any help would be appreciated, either on using STL sets or just
- generally on writing simple lightweight database applications in C++.
-
- Thanks in advance
-
-
- Chris Pilsworth
-
- DeMontfort University
- Milton Keynes (UK)
-
- PS. Please could you CC to hcm94cp@dmu.ac.uk
-